<template>
    <div class="border-creep">
        <slot />
    </div>
</template>

<script>
export default {
    name: "border-creep",
};
</script>

<style lang="less" scoped>
.border-creep {
    position: relative;
    padding: 20px;

    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: 2px solid gold;
        border-radius: 10px;
        animation: circle 3s infinite linear;
    }
}

@keyframes circle {
    0% {
        clip-path: inset(0 round 99% 0 99%);
    }

    80% {
        clip-path: inset(0 0 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}
</style>